@tailwind base;
@tailwind components;
@tailwind utilities;

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-background);
  color: var(--color-foreground);
}

html body {
  margin-right: 0 !important;
}

.node-hover {
  background: var(--color-lineColor);
}

.view-line {
  box-shadow: inset 0px 0px 0px 0px var(--color-uiAccent);
  font-variant-numeric: tabular-nums;
  transition: box-shadow 100ms ease;
}

.view-line::after {
  width: 100%;
  content: " ";
  height: 1px;
  background-color: var(--color-lineColor);
  display: block;
  position: absolute;
  top: calc(100% - 1px);
}

.monaco-editor .line-numbers {
  color: var(--color-lineNumbers) !important;
  font-size: 13px;
}

.monaco-editor,
.monaco-editor-background,
.monaco-editor .inputarea.ime-input {
  background: none !important;
}

.errorMessage {
  padding: 1rem;
  background-color: var(--color-nodeHover);
  font-size: 1rem;
}

.errorWrapper {
  display: grid;
  height: 100%;
  place-content: center;
}

.errorWrapper > div {
  display: grid;
  gap: 1rem;
}

.errorWrapper button {
  border: 1px solid var(--color-edgeHover);
  font-family: inherit;
  font-size: inherit;
  padding: 1rem;
  border-radius: 2px;
}

button {
  background-color: transparent;
  color: var(--color-foreground);
  appearance: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

button:active {
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.monaco-editor .margin {
  background-color: transparent !important;
}

.brand {
  border-right: 1px solid var(--color-uiAccent);
}
.brand svg path {
  fill: var(--color-foreground);
}

div[data-reach-dialog-content] {
  background: var(--color-background);
  color: var(--color-foreground);
  width: 90vw;
  overflow: auto;
  margin: 5vh auto;
}

@media (min-width: 800px) {
  div[data-reach-dialog-content] {
    width: 60vw;
    margin: 10vh auto;
  }
}

div[data-reach-dialog-overlay] {
  background: hsla(var(--color-overlayColor), 0.5);
  z-index: 1;
}

div[data-reach-tooltip] {
  background-color: var(--color-nodeHover);
  border-color: var(--color-nodeHover);
  box-shadow: none;
  border-radius: 2px;
  color: var(--color-foreground);
  padding: 0 calc(1 * var(--spacer-px));
}

@media (max-width: 799px) {
  div[data-reach-tooltip] {
    display: none !important;
  }
}

.slang-type:not(.size-1):not(.size-2):not(.size-3):not(.size-4):not(.size-5):not(.size-6):not(.size--1) {
  letter-spacing: 0.0125em;
}

.slang-type.size--1 {
  letter-spacing: 0.015em;
}

.slang-type.size--3 {
  letter-spacing: -0.025em;
}

.chart-link:hover .chart-link-buttons,
.chart-link:focus-within .chart-link-buttons {
  opacity: 1;
}
